//
//  RefreshTableView.h
//  HealthManager_Customer
//
//  Created by lzh on 2017/12/26.
//  Copyright © 2017年 Facebook. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MJRefresh.h"

@protocol RefreshDelegate <NSObject>

@optional
/**
 *    下拉 重新加载数据
 */
- (void)onRefreshing:(id)control;

@optional
/**
 *    上拉 加载更多数据
 */
- (void)onLoadingMoreData:(id)control;

@end

@interface RefreshTableView : UITableView<RefreshDelegate>


@property (nonatomic, weak) id<RefreshDelegate> refreshDelegate;

/**
 *  设置 table顶部 是否有 下拉刷新
 */
@property (nonatomic) BOOL canHeaderRefresh;

/**
 *  设置 table底部 是否有 上拉加载
 */
@property (nonatomic) BOOL canFooterRefresh;


@property (nonatomic,assign) BOOL isRefreshing;


@property (nonatomic,assign) BOOL isLoadingMoreData;


@property (nonatomic,assign) BOOL isAllLoaded;


@property (nonatomic, strong) NSString* noDataText;

- (void)showNoDataView;

- (void)hideNoDataView;

- (void)configFooterTitle:(NSString*)title state:(MJRefreshState)state;

@end
